import React from 'react'
import ReactDom from 'react-dom'
import Route from './router/index'
import FastClick from 'fastclick'
import {Provider} from 'react-redux'
FastClick.attach(document.body)
import store from '@/store/store'
// 热更新根节点容器
import {AppContainer} from 'react-hot-loader'
import Router  from './router'
import NavLink from 'react-router-dom/NavLink';
const render = Component =>{
    ReactDom.render(
        
            
        <Provider store={store}>
            <AppContainer>
                <Component/>
            </AppContainer>
        </Provider>
        
        ,
        document.getElementById('root')
    )
}
render(Router)
// 若代码发生改变，热更新重新加载/router/index.js

if(module.hot){
    module.hot.accept('./router/',()=>{
        render(Route)
    })
}

//registerServiceWorkder();
